Constructors | |
---|---|
Label( master, **options) |
where master : indicates parent window. |
Options | |
---|---|
text | Data within label |
background , bg / foreground , fg | set background / foreground color. |
font | Set the font style. |
justify |
to align the text inside the label field. LEFT/RIGHT/CENTER. |
width / height | width in chars. / height in lines. |
image | The image to display in the widget. The value should be a PhotoImage, BitmapImage, or a compatible object. |
from tkinter import * class MyWin(Tk): def __init__(self): super().__init__() data="CCIT Amravati" fnt="TimesRoman 50 bold" self.lbl=Label(self,text=data,font=fnt) self.lbl.pack() win=MyWin() win.mainloop()